import requests


def fiddlerProxy():
    proxyMeta = "http://127.0.0.1:8888"
    proxies = {"http": proxyMeta, "https": proxyMeta}
    return proxies


def get(url, params=None, **kwargs):
    return requests.get(url, params=params, **kwargs)


def getByFiddler(url, params=None, **kwargs):
    kwargs["proxies"] = fiddlerProxy()
    kwargs["verify"] = False
    return requests.get(url, params=params, **kwargs)


def post(url, data=None, json=None, **kwargs):
    return requests.post(url, data=data, json=json, **kwargs)


def postByFiddler(url, data=None, json=None, **kwargs):
    kwargs["proxies"] = fiddlerProxy()
    kwargs["verify"] = False
    return requests.post(url, data=data, json=json, **kwargs)
